<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/common/taglib.jsp"%>
<%@ include file="/WEB-INF/common/header.jsp"%>

	<div>
		<div class="layui-fluid">
			<div class="layui-row layui-col-space1">
				<div class="layui-col-md12">
					<div class="layui-form-query">
						<form class="layui-form" id="query_form">
							<div class="layui-form-item">
								<div class="layui-inline">
									<label class="layui-form-mid">类型：</label>
									<div class="layui-input-inline" style="width:100px;">
										<select name="type">
									   		<option value="">全部</option>
									        <option value="0">公众号</option>
									        <option value="1">小程序</option>
									   	</select>
									</div>
								</div>
								
								<div class="layui-inline">
									<label class="layui-form-mid">appid：</label>
									<div class="layui-input-inline" style="width: 100px;">
										<input type="tel" name="appid" autocomplete="off" class="layui-input" placeholder="模糊查询" />
									</div>
								</div>
								
								<div class="layui-inline">
									<label class="layui-form-mid">secret：</label>
									<div class="layui-input-inline" style="width: 100px;">
										<input type="text" name="secret" autocomplete="off" class="layui-input" placeholder="模糊查询" />
									</div>
								</div>
								
								<div class="layui-inline">
									<label class="layui-form-mid">token：</label>
									<div class="layui-input-inline" style="width: 100px;">
										<input type="text" name="token" autocomplete="off" class="layui-input" placeholder="模糊查询" />
									</div>
								</div>
								
								<div class="layui-inline">
									<label class="layui-form-mid">状态：</label>
									<div class="layui-input-inline" style="width:100px;">
										<select name="status" lay-verify="required">
									   		<option value="">全部</option>
									        <option value="0">启用</option>
									        <option value="9">禁用</option>
									   	</select>
									</div>
								</div>
								
								<div class="layui-inline">
									<label class="layui-form-mid">创建时间：</label>
									<div class="layui-input-inline" style="">
										<input type="text" name="createDate" autocomplete="off" class="layui-input fsDate" dateRange="1" placeholder="" />
									</div>
								</div>
								<div class="layui-inline">
									<div class="layui-input-inline">
										<button class="layui-btn" type="button" function="query"><i class="layui-icon">&#xe615;</i>查询</button>
										<button class="layui-btn layui-btn-danger" type="reset" function="clean">清空</button>
									</div>
								</div>
							</div>
						</form>
					</div>
				</div>
				
				<div class="layui-col-md12">
					<div class="layui-row grid-demo">
						<div class="layui-col-md12">
							<button class="layui-btn layui-btn-sm" function="top" topUrl="${ctx }/wx/conf/addView"
								topWidth="680px" topHeight="580px" isMaximize="0" topTitle="新增微信通道">
								<i class="layui-icon">&#xe654;</i>新增
							</button>
							<button class="layui-btn layui-btn-danger layui-btn-sm" function="submit"
								method="post" url="${ctx }/wx/conf/delAll" isMutiDml="1" isConfirm="1"
								confirmMsg="确定停用选中的数据吗？" inputs="appid:">
								<i class="layui-icon">&#xe640;</i>批量停用
							</button>
							<button class="layui-btn layui-btn-sm" function="refresh">
								<i class="layui-icon">&#x1002;</i>刷新
							</button>
						</div>
						
						<div class="layui-col-md12">
							<table id="fsDatagrid" lay-filter="fsDatagrid" class="fsDatagrid"
								isLoad="1" url="${ctx }/wx/conf/list" isPage="1" sortType="1"
								pageSize="10" defaultForm="query_form" height="full-135"></table>

							<div class="fsDatagridCols">
								<p checkbox="true" />
								<p field="sort" title="排序" width="80" sort="true" templet="#sortTemp" />
								<p field="type" title="类型" width="100" sort="true" dict="wxType" />
								<p field="appid" title="appid" width="200" sort="true"/>
								<p field="secret" title="secret" width="300" sort="true" />
								<p field="token" title="token" width="300" sort="true"/>
								<p field="status" title="状态" width="100" sort="true" templet="#statusTemp" />
								<p field="notice" title="备注" width="320" sort="true"/>
								<p align="center" toolbar="#actionTemp" title="操作" width="220"/>
							</div>

							<script type="text/html" id="statusTemp">
								<input type="checkbox" lay-skin="switch" disabled lay-text="启用|禁用" {{ d.status == 0 ? 'checked' : '' }}>
							</script>
							<script type="text/html" id="sortTemp">
								<span class="layui-badge">{{ d.sort }}</span>
							</script>
							<script type="text/html" id="actionTemp">
								<a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="top" topUrl="${ctx }/wx/conf/detail" topMode="readonly" topWidth="680px" topHeight="500px" topTitle="{{d.notice}}-详情" inputs="appid:">查看</a>
				 				<a class="layui-btn layui-btn-xs" lay-event="top" topUrl="${ctx }/wx/conf/addView" topWidth="680px" topHeight="580px" topTitle="{{d.notice}}-编辑" inputs="appid:">编辑</a>
{{# if (d.status == 0){ }}
	<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="submit" url="${ctx }/wx/conf/del" isConfirm="1" method="post" confirmMsg="确定停用当前记录吗？" inputs="appid:,status:9">停用</a>
{{# }else{ }}
	<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="submit" url="${ctx }/wx/conf/del" isConfirm="1" method="post" confirmMsg="确定启用当前记录吗？" inputs="appid:,status:0">启用</a>
{{# } }}
							</script>
							 
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<script type="text/javascript">
		
	</script>

<%@ include file="/WEB-INF/common/bottom.jsp"%>
